package com.dingtalk.dingbotmgr.model;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * Created by wyx on 2017/2/28.
 */
@Entity
public class Company {

    public enum Type {
        SHEJI("设计"),
        SHIGONG("施工"),
        JIANLI("监理"),
        SHENJI("审计"),
        ZHAOBIAO("招标");

        private final String str;

        Type(String str) {
            this.str = str;
        }

        public String getStr() {
            return str + "单位";
        }
    }

    private Integer id;

    private String name;

    private String admin;

    private Type type;

    @Id
    @GeneratedValue
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAdmin() {
        return admin;
    }

    public void setAdmin(String admin) {
        this.admin = admin;
    }

    @Enumerated(EnumType.STRING)
    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }
}
